/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.enterprise.web;

import com.assg2.dao.DaoActor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Kevin
 */
public class EditProfileCommand implements Command{
    
    public EditProfileCommand(){
    }
    
    public String execute(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        //TODO: set the response content type to "text/html" here
        //TODO: You'll have to use getWriter() to output some HTML texts
        //TODO: close the output stream

        //response.setContentType("text/html");// from response, set content type
        PrintWriter out = response.getWriter();// from response, get output writer

        HttpSession session = request.getSession(true);

        DaoActor da = new DaoActor();
        List actorList = da.listall();
        request.setAttribute("actorList", actorList);
        return "/editprofile.jsp";
        
    }
    
    
}
